﻿using AutoMapper;
using Esosi.Balance.Bll.Dtos;
using Esosi.Balance.Bll.Models.Hospital;
using System;
using System.Collections.Generic;
using System.Text;

namespace Esosi.Balance.Bll.ClinicBalance.Register
{
    public class RegisterHospital : BalanceBase
    {
        private readonly IMapper _mapper;

        public RegisterHospital(IMapper mapper)
        {
            //var config = new MapperConfiguration(cfg =>
            //{
            //    cfg.AddProfile<HospitalTpiProfile>();
            //    cfg.AddProfile<HospitalTpoProfile>();
            //});

            //_mapper = config.CreateMapper();
            _mapper = mapper;
        }

        public override RegisterTpoDto BalanceCalc(RegisterTpiDto tpid)
        {
            var tpi = _mapper.Map<RegisterHospitalTpi>(tpid);

            Console.WriteLine("自费政策");

            var tpod = new RegisterHospitalTpo
            {
                YingShou = 100
            };
            return _mapper.Map<RegisterTpoDto>(tpod);
        }
    }
}